﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kokomo.PeInspector
{
	class Grouping<TKey, TValue> : IGrouping<TKey, TValue>
	{
		public Grouping(
			TKey key,
			IEnumerable<TValue> values
			)
		{
			if (values == null) throw new ArgumentNullException("values");

			this.Key = key;
			this.Values = values;
		}

		public TKey Key { get; private set; }
		public IEnumerable<TValue> Values { get; private set; }

		public IEnumerator<TValue> GetEnumerator()
		{
			return this.Values.GetEnumerator();
		}

		System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
		{
			return this.GetEnumerator();
		}
	}
}
